import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

/**
 * @author gao
 * @date 2025/7/20 17:10
 */

public class Demo1 {
    public static void main(String[] args) throws InterruptedException {
        BlockingQueue<String> queue1 = new LinkedBlockingQueue<>(3);// 基于链表实现
        /*queue1.put("abc");
        System.out.println("添加了一个元素");

        queue1.put("abc");
        System.out.println("添加了一个元素");

        queue1.put("abc");
        System.out.println("添加了一个元素");

        queue1.put("abc");
        System.out.println("添加了一个元素");*/

        queue1.take();
    }
}